{extend name="$_admin_base_layout" /}

{block name="content"}

<div class="content" style="padding-top: 0px;">

    <div class="row">
        <div class="col-md-12">
            <div class="block">
                <div class="block-header bg-gray-lighter">
                    <ul class="block-options">
                        <li>
                            <button type="button" data-toggle="block-option" data-action="refresh_toggle"
                                    data-action-mode="demo"><i class="si si-refresh"></i></button>
                        </li>
                        <li>
                            <button type="button" data-toggle="block-option" data-action="fullscreen_toggle"><i
                                    class="si si-size-fullscreen"></i></button>
                        </li>
                    </ul>
                    <h3 class="block-title">新建会员账户调整单</h3>
                </div>
                <div class="block-content tab-content">
                    <div class="tab-pane active">
                        <div class="block-content">
                            <form class="form-horizontal form-builder row" name="form-builder"
                                  action="/admin.php/capital/adjustment/allsave/user_type/1.html" method="post">

                                <div class="form-group col-md-4 " id="form_group_userid">
                                    <label class="col-xs-12" for="userid">会员</label>

                                    <div class="col-sm-12">

                                        <select class="js-select2 form-control ajax select2-hidden-accessible"
                                                id="userid" name="userid[]" data-placeholder="请选择一项或多项"
                                                url="/admin.php/capital/adjustment/adjustment_list/type/1" datakey="id"
                                                dataname="name" limit="20" delay="250" placeholder="请选择" tabindex="-1"
                                                aria-hidden="true">
                                            <!--<option></option>-->
                                        </select><span class="select2 select2-container select2-container--default"
                                                       dir="ltr" style="width: 593px;"><span class="selection"><span
                                            class="select2-selection select2-selection--single" role="combobox"
                                            aria-haspopup="true" aria-expanded="false" tabindex="0"
                                            aria-labelledby="select2-userid-container"><span
                                            class="select2-selection__rendered" id="select2-userid-container"><span
                                            class="select2-selection__placeholder">请选择一项或多项</span></span><span
                                            class="select2-selection__arrow" role="presentation"><b
                                            role="presentation"></b></span></span></span><span class="dropdown-wrapper"
                                                                                               aria-hidden="true"></span></span>
                                    </div>
                                </div>

                                <div class="form-group col-md-4 " id="form_group_num">
                                    <label class="col-xs-12" for="num">充值金额</label>

                                    <div class="col-sm-12">

                                        <input class="form-control" type="text" id="num" name="num" value="">
                                    </div>
                                </div>

                                <div class="form-group col-md-4 " id="form_group_type">
                                    <label class="col-xs-12" for="type">充值原因</label>

                                    <div class="col-sm-12">
                                        <select class="js-select2 form-control select2-hidden-accessible" id="type"
                                                name="type" data-allow-clear="true" data-placeholder="请选择一项"
                                                tabindex="-1" aria-hidden="true">
                                            <option></option>
                                            <option value="1">就是想充啊</option>
                                            <option value="2">钱多</option>
                                            <option value="3">任性</option>
                                        </select><span class="select2 select2-container select2-container--default"
                                                       dir="ltr" style="width: 593px;"><span class="selection"><span
                                            class="select2-selection select2-selection--single" role="combobox"
                                            aria-haspopup="true" aria-expanded="false" tabindex="0"
                                            aria-labelledby="select2-type-container"><span
                                            class="select2-selection__rendered" id="select2-type-container"><span
                                            class="select2-selection__placeholder">请选择一项</span></span><span
                                            class="select2-selection__arrow" role="presentation"><b
                                            role="presentation"></b></span></span></span><span class="dropdown-wrapper"
                                                                                               aria-hidden="true"></span></span>
                                    </div>
                                </div>

                                <div class="form-group col-md-12 " id="form_group_notes">
                                    <label class="col-xs-12" for="notes">备注</label>

                                    <div class="col-xs-12">
                                        <textarea class="form-control" id="notes" rows="7" name="notes"
                                                  placeholder="请输入备注"></textarea>
                                    </div>
                                </div>
                                <div class="form-group col-md-12">
                                    <div class="col-xs-12">
                                        <button class="btn btn-minw btn-primary ajax-post" target-form="form-builder"
                                                type="submit">
                                            提交
                                        </button>
                                        <button class="btn btn-default" type="button"
                                                onclick="javascript:history.back(-1);return false;">
                                            返回
                                        </button>


                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


</div>
{/block}

{block name="script"}
<script src="/public/static/admin/js/core/jquery.min.js"></script>
<script>
    $(document)
            .off('blur','#num')
            .on('blur','#num',function(){
                //只能输入数字
                var str = $('#num').val();
                var reg1 = (/^([+-]?[\d]+[.]\d{0,2})$/gi).test(str);
                var reg2 = (/^([+-]?[\d]+)$/gi).test(str);
                if(reg1||reg2){
                    $(this).css('background',"#fff");
                }else{
                    $(this).val('');
                }

            })
</script>
{/block}

